import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;


public class LiczbaTest4 {

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test(expected = Exception.class)
	public void testLiczba() throws Exception
	{
		Liczba test;
		try
		{
			test = new Liczba(2);
			assertNotNull(test);
		}
		catch(Exception ex)
		{
			fail("Fail");
		}
		test = new Liczba(-2);
	}

	@Test(timeout=1000)
	public void testZapis() {
		Liczba test,test2;
		try
		{
			test = new Liczba(10);
			assertNotNull("Success",test);
			assertEquals("Success","1010",test.zapis(2));
			test = new Liczba(255);
			assertTrue("Success","FF".compareTo(test.zapis(16)) == 0);
			test = new Liczba(5);
			test2 = new Liczba(5);
			assertNotSame(test,test2);
		}
		catch(Exception fail)
		{
			fail("Niepoprawny wyjatek");
		}
	}
	
	@Ignore
	@Test
	public void testZapis2()
	{
		fail("Ignore me");
	}

}